package creationpattern.factorypattern;

public class FactoryPattern {
	Shape getShape(String s) {
		if(s == null) return null;
		else if(s.equalsIgnoreCase("CIRCLE"))
			return new Circle();
		else if(s.equalsIgnoreCase("RECTANGLE"))
			return new Rectangle();
		else if(s.equalsIgnoreCase("SQUARE"))
			return new Square();
		
		return null;
	}
}
